package org.ehe.finance.receivable.domain;

import org.ehe.common.mybatis.core.domain.BaseEntity2;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.math.BigDecimal;
import java.time.LocalDate;
/**
 * 应收账款实体类
 * @author :zhangnn
 * @className :ErpFinanceReceivable
 * @description: TODO
 * @date 2025-08-28 09:26:44
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("erp_finance_receivable")
public class ErpFinanceReceivable extends BaseEntity2 {
    /**
     * 应收账款ID
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 单据编号
     */
    @TableField("bill_no")
    private String billNo;

    /**
     * 客户ID
     */
    @TableField("customer_id")
    private Long customerId;

    /**
     * 单据日期
     */
    @TableField("bill_date")
    private LocalDate billDate;

    /**
     * 单据类型:1销售发票,2其他应收
     */
    @TableField("bill_type")
    private Integer billType;

    /**
     * 来源单据号
     */
    @TableField("source_bill_no")
    private String sourceBillNo;

    /**
     * 应收总金额
     */
    @TableField("total_amount")
    private BigDecimal totalAmount;

    /**
     * 已收款金额
     */
    @TableField("paid_amount")
    private BigDecimal paidAmount;

    /**
     * 未收款金额
     */
    @TableField("unpaid_amount")
    private BigDecimal unpaidAmount;

    /**
     * 到期日期
     */
    @TableField("due_date")
    private LocalDate dueDate;

    /**
     * 币种ID
     */
    @TableField("currency_id")
    private Long currencyId;

    /**
     * 汇率
     */
    @TableField("exchange_rate")
    private BigDecimal exchangeRate;

    /**
     * 部门ID
     */
    @TableField("department_id")
    private Long departmentId;

    /**
     * 业务员ID
     */
    @TableField("salesman_id")
    private Long salesmanId;

    /**
     * 结算状态:1未结算,2部分结算,3已结算
     */
    @TableField("settlement_status")
    private Integer settlementStatus;

    /**
     * 备注
     */
    @TableField("remark")
    private String remark;
}
